package com.fatcat.easybuy.service;


import com.fatcat.easybuy.pojo.EasyBuyOrder;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @author Fatcat
 * @description 针对表【easybuy_order】的数据库操作Service
 * @createDate 2025-09-10 10:52:53
 */
public interface EasyBuyOrderService {

    /**
     * 查询所有订单
     *
     * @return
     */
    PageInfo<EasyBuyOrder> selectAllOrder(Map<String, Object> params);

    /**
     * 新增订单
     *
     * @param userId
     * @param orderList
     * @return
     */
    boolean addOrder(Map<Long, Integer> orderList, Long userId,Integer addressId);

    /**
     * 根据订单id关闭订单
     */
    boolean closeOrder(String serialNumber);
    /**
     * 根据订单号查询订单
     */
    EasyBuyOrder getOrderBySerialNumber(String outTradeNo);

    /**
     * 更新订单
     */
    boolean updateOrder(EasyBuyOrder easyBuyOrder);

    /**
     * 根据订单id查询订单
     */
    EasyBuyOrder getOrderById(Long orderId);

    /**
     * 删除订单
     */
    boolean deleteOrder(Long orderId);

    /**
     * 修改订单状态
     */
    boolean changeStatus(Long orderId, Integer status);
}
